# -*- coding:utf-8 -*-
# CREATED BY: jiangbohuai
# CREATED ON: 2021/5/6 2:24 PM
# LAST MODIFIED ON:
# AIM:

from typing import Union, Optional, Tuple
import numpy as np


def taxicab_norm(matrix: np.ndarray, axis: Optional[Union[int, Tuple[int]]] = None) -> np.ndarray:
    return np.sum(np.abs(matrix),axis=axis)